<div class="container contents bgw">
	<div class="col-sm-12 ">
		<form class="form-horizontal ruleadd">
			<div class="col-sm-12 ">
				<form class="form-horizontal ruleadd">
					<div class="out ">
						<div class="col-sm-10 col-md-offset-1" ng-repeat="(name,rule) in view.rules" ng-if="rule.show">
							<form name="{{name}}">
								<div class="panel panel-default">
									<div class="panel-heading">
										<div class="panel-title" ng-bind="rule.name"></div>
									</div>
									<div class="panel-body">
										<div ng-if="rule.state=='show'" ng-include="'admin/rule/show.html'"></div>
										<div ng-if="rule.state=='edit'" ng-include="'admin/rule/module/'+name+'.html'"></div>
									</div>

									<ul class="list-group">
										<li class="list-group-item" style="overflow:hidden">
											<a class="btn btn-danger col-sm-3 col-sm-offset-9" ng-click="ruleFn.buttonFn(name)" ng-bind="rule.state=='show'?'修改':'保存'"></a>
										</li>
									</ul>
								</div>
							</form>
						</div>
					</div>
				</form>
			</div>
			<div class="out col-sm-12">

				<div class="col-sm-4 col-sm-offset-1">
					<a class="btn btn-default btn-block" back-button>返回</a>
				</div>
				<div class="col-sm-6">
					<button  type="button" class="btn btn-danger btn-block"  ng-click="ruleFn.addRuleFn()">添加活动</button>
				</div>
			</div>
			

		</form>
	</div>
	<div id="showadd" class="modal fade addpanel" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content" style="overflow:hidden">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span>
						<span class="sr-only">Close</span>
					</button>
					<h4 class="modal-title" ng-bind="view.modal.title"></h4>
				</div>
				<div class="modal-body" ng-include="'admin/rule/module/'+view.modal.html+'.html'"></div>
				<div class="modal-footer" ng-if="view.modal.couponFn">
					<div class="col-sm-3 col-sm-offset-6">
						<a class="btn btn-danger btn-block" ng-click="ruleFn.saveCouponFn()">确定</a>

					</div>
					<div class="col-sm-3">
						<a data-dismiss="modal" class="btn btn-default btn-block">关闭</a>

					</div>

				</div>
			</div>
		</div>
	</div>
